package it.koutifaris.travianmap.context;

import java.text.DateFormat;
import java.text.NumberFormat;

import android.app.Activity;

class LocaleSettingsImpl implements LocaleSettings {

	private final DateFormat dateFormat;
	private final NumberFormat numberFormat;

	public LocaleSettingsImpl(Activity activity) {
		dateFormat = android.text.format.DateFormat.getDateFormat(activity);
		numberFormat = NumberFormat.getInstance();
		numberFormat.setMaximumFractionDigits(2);
	}

	@Override
	public NumberFormat getDefaultNumberFormat() {
		return numberFormat;
	}

	@Override
	public DateFormat getDefaultDateFormat() {
		return dateFormat;
	}
}
